﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using Microsoft.AspNet.Identity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace XHD.WXZJ.Departments
{
    /// <summary>
    /// Base class for Department.
    /// 
    /// </summary>
    //[Table("AbpDepartments")]
    public abstract class AbpDepartmentBase : FullAuditedEntity<int>, IMayHaveTenant
    {
        /// <summary>
        /// 部门名称长度属性.
        /// 
        /// </summary>
        public const int MaxNameLength = 255;

        /// <summary>
        /// 租户ID 如果部门存在租户则为空否则有值.
        /// 
        /// </summary>
        public virtual int? TenantId { get; set; }

        /// <summary>
        /// Unique name of this role.
        /// 
        /// </summary>
        [Required]
        [StringLength(255)]
        public virtual string Name { get; set; }
    }
}
